const state = {
    appState: 'appState',
    userName: '',
    token: '',
    cloudRender: '',
    isHome: false,
    showTime: true,
    liftPoiData: [],
    greenMarkPoiData: []
};

const mutations = {
    //存储token
    SET_TOKEN: (state, token) => {
        state.token = token;
    },
    //存储云渲染实例
    SET_USERNAME: (state, cloudRender) => {
        state.cloudRender = cloudRender
    },
    //导航栏显示
    CHANGE_HOME: (state, isHome) => {
        state.isHome = isHome
    },
    // 显示屏幕时间
    CHANGE_SHOWTIME: (state, showTime) => {
        state.showTime = showTime
    },
    // // 当云渲染加载完成时，隐藏屏幕mask
    // CHANGE_SHOWMASK: (state, showMask) => {
    //   state.showMask = showMask
    // }
    SAVE_LIFT_POI_DATA: (state, liftPoiData) => {
        state.liftPoiData = liftPoiData
    },
    SAVE_GREENMARK_POI_DATA: (state, greenMarkPoiData) => {
        state.greenMarkPoiData = greenMarkPoiData
    },
};

const actions = {
    login({
        commit
    }, userInfo) {
        commit('SET_USERNAME', userInfo);
    }
};



export default {
    namespaced: true,
    state,
    mutations,
    actions
}